<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>LEA Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">LEA Instruction <BR>
  </h1>
  <hr noshade></h1>
        <BR>
        <span class="text">Loads an effective address into an address register. LEA is often used when writing code that must be independent of the position in the memory (which all Fargo programs are). It's often used with the address methods x(PC) or x(PC,xr.s).<BR>
LEA also adds a constant to an address register without changing the flags, and/or also an index with x(An,xr.s).<BR>
        <BR>
ADDRESS METHODS: (An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s)<BR>
        <BR>
DATA LENGTH: Longword<BR>
<BR>
FLAGS: Unaffected<BR>
        <BR>
SYNTAX: LEA &lt;ea&gt;,An</span><p><span class="text">EXAMPLE CODE:</span></p>
<p class="sourcecode"><span class="text">LEA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
memorylocation,A1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *loads the address of a memory location into A1.&nbsp; 
This is commonly used in the trap statement when you are outputting strings to 
the screen</span></p>
<p><span class="text"><BR>
        </span><span class="text">
        </span></p>
</h1>
</body>
</html>